class Person {
  String name = "张三";
  int age = 23;

  void getInfo() {
    print("${this.name}---${this.age}");
  }

  void setInfo(int age) {
    this.age = age;
  }
}

main() {
  Person p1 = new Person();
  print(p1.name);
  p1.setInfo(20);
  p1.getInfo();
}
